package com.luckyzhang.day2.method2Factory;

public class ConcreateFactoryA extends IFactory{
    @Override
    public <T extends Product> T createFactory(Class<T> clazz) {
        Product p = null;
        try {
           p = (Product) Class.forName(clazz.getName()).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return (T) p;
    }
}
